<?php

namespace hiduoke\services\formBuilder\form;

use FormBuilder\Driver\FormComponent;
use FormBuilder\Factory\Elm;

class DkFileListInput extends FormComponent
{

    public function createValidate()
    {
        return Elm::validateStr();
    }

    /**
     * Dialog 自身是否插入至 body 元素上。
     * @return DkFileListInput
     */
    public function appendToBody()
    {
        return $this->props(['appendToBody' => true]);
    }

    public function limit($num)
    {
        return $this->props(['limit' => $num]);
    }

    public function disabled($bool = true)
    {
        return $this->props(['disabled' => $bool]);
    }
}
